package com.mindskip.xzs.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.Exam;
import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.viewmodel.IdNameKV;
import com.mindskip.xzs.viewmodel.admin.exam.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExamService extends IService<Exam> {
    void updateCategorysInCache();
    List<String> queryCategoryListInCache(@Param("keyword") String keyword);
    PageInfo<PageExamRes> queryExamList(PageExamReq req);
    Boolean addExam(AddExamReq addExamReq, Integer id);
    Boolean rebuildExam(RebuildExamReq req);
    Boolean addExamUsers(AddExamUserReq addExamUserReq);
    Boolean editExam(EditExamReq editExamReq, Integer id);
    Boolean delExam(Long id, Boolean notice, User user);
    Boolean closeExam(Long id, Boolean notice);
    Boolean openExam(Long id, Boolean notice);
    List<IdNameKV> queryExamKVListInCache(String keyword);
    void updateExamKVInCache();
    List<IdNameKV> queryUnexaminedList(Integer examId);

    Boolean noticeUnexaminedList(Integer examId);

    Boolean scheduleQueryExamRankNotice();
}
